package com.house.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.house.mapper.TUserMapper;
import com.house.pojo.TUser;
import com.house.pojo.TUserExample;
import com.house.pojo.TUserExample.Criteria;

@Service
public class UserServiceImpl implements UserService {
	@Autowired
	private TUserMapper tUserMapper;
	@Override
	public List<TUser> userLogin(String username, String password) {
		TUserExample example = new TUserExample();
		Criteria criteria = example.createCriteria();
		criteria.andPasswordEqualTo(password);
		criteria.andNameEqualTo(username);
		List<TUser> listTUser = this.tUserMapper.selectByExample(example);
		return listTUser;
	}

}
